﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Topro.Application
{
    using Topro.DataAccess;
    using Topro.Entity.Query;
    using Topro.Entity.Response;
    using Topro.Libraries;
    using Topro.Libraries.Extension;

    /// <summary>
    /// 异常业务层
    /// </summary>
    public class DeviceExceptionCodeApp : Base<DeviceExceptionCodeApp>
    {
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <returns></returns>
        public List<DeviceExceptionCodeResponse> GetList(DeviceExceptionCodeListQuery query)
        {
            //获取指令
            var list = Using<IDeviceExceptionCode>().GetList(query);

            if (list != null && list.Any())
            {
                return list.MapTo<List<DeviceExceptionCodeResponse>>();
            }

            return null;
        }
    }
}
